#pragma once
#include <lcir/IR/Type.h>
#include <lcir/IR/LambdaDialect.h>
namespace lcir {

/// lambdaType 是一种特殊的VarComplexType
class LambdaType : public VarComplexTypeCRTP<LambdaType, LambdaDialect> {
  Type *resultType{nullptr};
  std::vector<Type *> paramTypes;
  std::string name{"lambda"};

public:
  LambdaType() : VarComplexTypeCRTP("lambdatype") {}
  LambdaType(const std::vector<Type *> &paramTypes, Type *resultType )
      : VarComplexTypeCRTP("lambdaType"), resultType(resultType), paramTypes(paramTypes) {
  }
  LambdaType(const std::vector<Type *> &paramTypes)
      : VarComplexTypeCRTP("lambdaType"), resultType(nullptr), paramTypes(paramTypes) {
  }
  LambdaType(Type *resultType )
      : VarComplexTypeCRTP("lambdaType"), resultType(nullptr){
  }

  std::string toString() const { return name; }
  std::vector<Type *> getParamTypes() const { return paramTypes; }
 Type* getResultType() const { return resultType; }
};


}